/**
 * @Project : ProgrammingExercises
 * @Package : Leetcode
 * @File : Q2529.java
 * @Author : WangRuoyu
 * @Date 2023/1/25 17:45
 */

package leetcode;

public class Q2529 {
    public int maximumCount(int[] nums) {
        int pos = 0;
        int nag = 0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] > 0) {
                pos++;
            } else if (nums[i] < 0) {
                nag++;
            }
        }
        return Math.max(pos, nag);
    }

    public static void main(String[] args) {
        Q2529 sl = new Q2529();
        int[] nums = {-2, -1, -1, 1, 2, 3};
        System.out.println(sl.maximumCount(nums));
    }
}